# -*- coding: utf-8 -*-

"""
Created on 11/17/2021
gogogo.
@author: Kang Xiatao (kangxiatao@gmail.com)
"""
from copy import deepcopy

"""
nohup python gogogo.py > results/gogogo2.txt 2>&1 &
CUDA_VISIBLE_DEVICES=0 nohup python gogogo.py > /dev/null 2>&1 &
"""

import os
import time

print('gogogo')

def run_fun(cmd='', run_check=False):
    while True:
        start_time = time.time()
        print(cmd)
        os.system(cmd)
        if not run_check:
            break
        if time.time() - start_time > 600:  # 至少十分钟
            break
    time.sleep(1 * 60)

time.sleep(3 * 60 * 60)

# run_fun("nohup python main.py --env_id HalfCheetah-v2 --data_type medium --dataset_num 1 --cql --cf_cql --central_critic > /dev/null 2>&1 &")
# run_fun("python main.py --env_id HalfCheetah-v2 --data_type medium --dataset_num 0 --cql --cf_cql --central_critic")

run_fun("nohup python main.py --env_id HalfCheetah-v2 --data_type medium --dataset_num 1 --cql --cf_cql --central_critic --use_o2o --use_offline_data --use_online_buffer --offline_model_dir /autodl-tmp/CFCQL/continuous/results/0827/model/HalfCheetah-v2/CC_cfcql_medium__2025-08-27_17-41-40-570125__0 > /dev/null 2>&1 &")
run_fun("python main.py --env_id HalfCheetah-v2 --data_type medium --dataset_num 0 --cql --cf_cql --central_critic --use_o2o --use_offline_data --use_online_buffer --offline_model_dir /autodl-tmp/CFCQL/continuous/results/0827/model/HalfCheetah-v2/CC_cfcql_medium__2025-08-27_17-42-40-359489__0")
